import java.util.Stack;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: fzykd
 * Date: 2022-04-13
 * Time: 14:06
 */
public class TestDemo {
    public static void main(String[] args) {
        MyStack myStack = new MyStack();
        myStack.push(1);
        System.out.println(myStack.peek());
        System.out.println(myStack.isEmpty());


    }


    public static void main1(String[] args) {  // 栈 先进后出
        Stack<Integer> stack = new Stack<>();
        stack.push(1);
        stack.push(2);// push 入栈
        stack.push(3);
        stack.push(4);
        System.out.println(stack.pop());// 弹出并删除
        System.out.println(stack.empty()); // 判断是否为空
        System.out.println(stack.peek()); // 弹出不删除该元素
        System.out.println(stack.peek());

    }
}
